import React, { Suspense } from 'react';
import ReactDOM from 'react-dom';
import { renderRoutes } from 'react-router-config'
import routes from './router/index';
import {
  BrowserRouter as Router,
} from 'react-router-dom';
import './css/style.css'
import Index from './page/Index'
class App extends React.Component {

  render() {
    return (
      <>
        <Suspense fallback={<div>加载中</div>}>
          {
            renderRoutes(routes)
          }
        </Suspense>
      </>
    )

  }
}

ReactDOM.render(
  <Router>
    <App />
  </Router>,
  document.getElementById('root')
);
